1: doctype public "-//IDN etl.sf.net//ETL//Grammar 0.2";
     2: 
     3: /// This is a test grammar used to test fallback
     4: /// functionality in the parser.
     5: grammar net.sf.etl.tests.data.fallbacks.Fallbacks {
     6: 	namespace t = "http://etl.sf.net/2006/tests/fallbacks";
     7: 	/// Base context. It contains definitions of documentaion and attributes 
     8: 	/// that will be used in later sections.
     9: 	context abstract Base {
    10: 		
    11: 		/// Simple documentation production
    12: 		documentation Documnetation {
    13: 			let documentation += doclines;
    14: 		};
    15: 		
    16: 		/// Simple attributes production
    17: 		attributes Attributes {
    18: 			section @ {
    19: 				brackets[] {
    20: 					let attributes += list , {
    21: 						identifier;
    22: 					};		
    23: 				};
    24: 			};
    25: 		};
    26: 	};
    27: 
    28: 	/// A context with empty fallbacks
    29: 	context EmptyFallbacks {
    30: 		include Base;
    31: 		
    32: 		/// This is a blank statement
    33: 		statement BlankStatement {
    34: 			object t:BlankStatement {
    35: 			};
    36: 		};
    37: 
    38: 		/// Some non-empty statement
    39: 		statement SomeStatement {
    40: 			object t:SomeStatement {
    41: 				section some {
    42: 					let value = identifier;
    43: 				};
    44: 			};
    45: 		};
    46: 	};
    47: 
    48: 	/// A context with non-empty fallbacks
    49: 	context NonEmptyFallbacks {
    50: 		include Base;
    51: 		
    52: 		/// Some non-empty statement that is designated as statement
    53: 		statement SomeStatement {
    54: 			object t:SomeStatement {
    55: 				section some {
    56: 					let value = identifier;
    57: 				};
    58: 			};
    59: 		};
    60: 	};
    61: };